Producing parallel code is a complex task. Manual parallelization requires careful crafting of parallel code by highly skilled parallel programmers. Several parallel programming models have been developed to ease this challenging task and while these models successfully free the programmer from reasoning about certain tedious and complicated details, they still burden the programmer with the major conceptual tasks of parallelization and data distribution, along with reasoning about many complex details such as data dependencies and communication costs. Automatic parallelizing compilers exist for limited domains, mostly scientific application domains. Those compilers have been shown to be capable of automatically parallelizing programs that were written in a sequential language; however, in the general case outside of such specific application domains, parallelizing compilers are largely ineffective.
Refactorings are semantic-preserving source-to-source code transformations. Refactoring has traditionally been used in program maintenance to improve the structure and readability of code. Existing refactoring tools are typically destructive; the previous version of the source code is lost after the transformation has been applied.
The present disclosure, in one aspect, addresses the problem of how to enable programmers to build parallel applications for multi-core and other parallel machines through interactive tool-assisted concurrency refactoring of the code. Known solutions to this problem are based on either manual parallelization or automatic (compiler) parallelization. Inspite of many advances in parallel programming models, manual parallelization of code remains to be a difficult task that typically only a small number of highly trained class of programmers are able to conquer. Automatic parallelization has been successful when restricting the problem (mostly to regular loop dominated scientific applications) but has not yet provided a general solution to the problem.